<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    const pig = { name: '佩奇', age: 6 }
    const { name, age } = pig
    console.log(name, age)

    const pigg = { name: '佩奇', age: 6 }
    const { name: uname, age: agee } = pigg
    console.log(uname, agee)

    const goods = [{ goodsName: '小米', price: 1999 }]
    const [{ goodsName, price }] = goods
    console.log(goodsName, price)
  </script>
</body>

</html>